package com.itheima.mm.controller;

import com.itheima.mm.entity.Result;
import com.itheima.mm.pojo.ReviewLog;
import com.itheima.mm.service.QuestionService;
import com.itheima.mm.service.ReviewLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description ReviewController
 * @Author songyu
 * @Date 2024-06-27
 */
@RestController
@Slf4j
@RequestMapping("/review")
public class ReviewController {

    @Autowired
    private ReviewLogService reviewLogService;


    /**
     * 处理审核请求
     * @param reviewLog
     * @return
     */
    @RequestMapping("/add.do")
    public Result add(@RequestBody ReviewLog reviewLog) {
        log.info("处理审核请求，请求参数：{}",reviewLog);

        //调用业务方法
        reviewLogService.add(reviewLog);

        return Result.success(null,"操作成功");
    }
}